package com.ruoyi.network.model.vo;

import com.ruoyi.network.common.validation.UpdateGroupValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Administrator
 */
@Data
@ApiModel(description = "IP段结构请求参数", value = "IP段结构请求参数")
public class IpRangeRequestVO implements Serializable {
    @ApiModelProperty(value = "数据ID", example = "1")
    @NotNull(message = "数据ID不能为空", groups = {UpdateGroupValidation.class})
    private Long id;

    @ApiModelProperty(value = "网段类型", example = "1")
    private int type;

    @ApiModelProperty(value = "网段名称", required = true, example = "192.168.1 或 192.168.1.0")
    @NotBlank(message = "网段名称不能为空")
    private String rangeName;

    @ApiModelProperty(value = "子网长度", required = true, example = "24")
    @Range(min = 0, max = 32, message = "子网长度范围1-32")
    @NotNull(message = "子网长度不能为空")
    private Integer ipMask;

    @ApiModelProperty(value = "业务ID", example = "1001")
    private Long usageBizId;

    @ApiModelProperty(value = "部门ID", required = true, example = "2001")
    private Long usageDeptId;

    @ApiModelProperty(value = "可分配数量", required = true, example = "4")
    @NotNull(message = "可分配数量不能为空")
    private Integer asgCount;

    @ApiModelProperty(value = "网段标识", example = "描述描述")
    private String networkIdentifier;

    @ApiModelProperty(value = "备注", example = "默认")
    private String remark;

    private String rangeKey;
}
